﻿
$(document).ready(function () {
    //隐藏多余搜索框
    $('.search_input').nextAll().hide();

    //下拉列表
    $('.select1').click(function () {
        var index = $(".select1").find("option:selected").index();
        var show1 = $('.search_context1 .search_input');
        var show2 = show1.nextAll();
        if (index == 0) {
            show1.show();
            show2.hide();
        } else {
            show2.show();
            show1.hide();
        }
    });

    //交换搜索框两地点内容
    $('.search_context1 .search_input2 img').click(function () {
        input_value1 = $('.search_context1 .search_input1 input');
        input_value2 = $('.search_context1 .search_input3 input');
        var cityone = input_value1.val();
        var citytwo = input_value2.val();
        input_value1.val(citytwo);
        input_value2.val(cityone);

    });

    //筛选查找按钮
    $('.find_context').hide();
    $('.find a').click(function () {
        $('.find_context').slideToggle();
    });

})

